//
//  BSLCapture.m
//  Chamleon-template
//
//  Created by RYAN on 15/11/25.
//
//

#import "BSLCapture.h"

@implementation BSLCapture

- (void)stopVideo:(CDVInvokedUrlCommand*)command{
    [self.commandDelegate runInBackground:^{
        if (pickerController) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [pickerController stopVideoCapture];
            });
            
            [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId];
        }
        
        else{
            [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"录像还没开始！！"] callbackId:command.callbackId];
        }
    }];
}

@end
